package com.example.demo.service.impl;

import com.example.demo.dao.GetUserListMapper;
import com.example.demo.service.GetUserListService;
import com.example.demo.vo.Page;
import com.example.demo.vo.User;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

@Service
@Transactional
public class GetUserListServiceImpl implements GetUserListService {

    @Resource
    private GetUserListMapper getUserListMapper;

    @Override
    public List<User> getUserList() {
       return getUserListMapper.getUserList();
    }

    @Override
    public int addUser(User user) {
        return getUserListMapper.addUser(user);
    }

    @Override
    public int updateUser(User user) {
        return getUserListMapper.updateUser(user);
    }

    @Override
    public int delUser(int id) {
        return getUserListMapper.delUser(id);
    }

    @Override
    public List<User> getUserListLimt(Page page) {
        return getUserListMapper.getUserListLimt(page);
    }
}
